#include <speech.h>

using namespace std;

string app_id = "17496766";
string api_key = "gG1oXkYhqC72KbsfKNawHZNv";
string secret_key = "ijAXKgNwUaQZbbVXryZmef6DnouQ6EnS";

int main()
{
	aip::Speech client(app_id, api_key, secret_key);

	std::string file_content;
    aip::get_file_content("test.pcm", &file_content);

	//配置参数
    //std::map<std::string, std::string> options;
    //options["dev_pid"] = "1537";
    Json::Value result = client.recognize(file_content, "pcm", 16000, aip::null);
	if (result["err_no"].asBool())
	{
		cout << result.toStyledString();
	}
	cout << result["result"][0].asString() << endl;

	return 0;
}

